package singlelinkedlist;

public class Test {
    public static void main(String[] args) {
        IMySingleLinkedList list = new MySingleLinkedList();
        list.addLast(1);
        list.addLast(1);
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.addLast(4);
        list.addLast(5);
        list.addLast(6);
        list.removeAllKey(1);
        list.display();
    }
    public static void main1(String[] args) {
        IMySingleLinkedList list = new MySingleLinkedList();
        /*list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        System.out.println("====addFirst===");
        list.display();*/
        System.out.println("===addLast===");
        list.addLast(3);
        list.addLast(2);
        list.addLast(3);
        list.addLast(3);
        list.addLast(3);
        list.display();
        System.out.println("===size===");
        System.out.println(list.size());
        /*System.out.println("===addIndex===");
        list.addIndex(0,10);
        list.addIndex(4,10);
        list.display();
        list.addIndex(6,10);*/
        System.out.println("===contains===");
        System.out.println(list.contains(1));
        System.out.println(list.contains(3));
        /*        System.out.println("===remove===");
        list.remove(1);
        list.remove(1);
        list.display();*/
        System.out.println("===removeAllKey===");
        list.removeAllKey(3);
        list.display();
        list.clear();
    }
}
